
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>立方体</title>
    <style>
        .cube {
            position: relative;
            width: 500px;
            height: 500px;
            margin: 100px auto;
            transform-style: preserve-3d;
        }

        .cube:hover {
            transform: rotateX(360deg) rotateY(180deg) rotateZ(360deg);
            transition: 10s;
        }

        .front {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }


        .left {
            transform: translateX(-250px) rotatey(90deg);
        }

        .right {
            transform: translateX(250px) rotatey(90deg);
        }

        .forward {
            transform: translatez(250px);
        }

        .back {
            transform: translatez(-250px);
        }

        .top {
            transform: translatey(-250px) rotatex(90deg);
        }

        .bottom {
            transform: translatey(250px) rotatex(90deg);
        }
    </style>
</head>

<body>
    <div class="cube">
        <div class="front forward"><img src="./1.jpg" alt=""></div>
        <div class="front back"><img src="./2.jpg" alt=""></div>
        <div class="front left"><img src="./3.jpg" alt=""></div>
        <div class="front right"><img src="./4.jpg" alt=""></div>
        <div class="front bottom"><img src="./5.jpg" alt=""></div>
        <div class="front top"><img src="./6.jpg" alt=""></div>
    </div>
</body>

</html>